Skip to content

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Oct 11, 2025

Additional details

Using Storage.clearDataForOrigin was taking up to 4 seconds and the specific StorageType that was problematic was file_systems which is the data involved with the File Systems API. Dropping this type improves the time down to under 100ms. We are theorizing that this is not a commonly used API and will not cause state leakage between tests. If, in the future we deem it necessary to clear this out, we will need to figure out how to make this more performant.

Steps to test

How has the user experience changed?

PR Tasks


Note

Skip clearing file_systems in CDP Storage.clearDataForOrigin during browser resets to significantly improve between-spec performance; update Electron flow, unit tests, and changelog.

  • Server (CDP reset behavior):
    • Update packages/server/lib/browsers/cdp_automation.ts to call Storage.clearDataForOrigin with a targeted storageTypes list (cookies, indexeddb, local_storage, shader_cache, service_workers, cache_storage, interest_groups, shared_storage), omitting file_systems.
    • In packages/server/lib/browsers/electron.ts, apply the same targeted storageTypes during initial browser-state clearing.
  • Tests:
    • Adjust expectations in packages/server/test/unit/browsers/cdp_automation_spec.ts and packages/server/test/unit/browsers/electron_spec.js to match the new storageTypes set.
  • Changelog:
    • Add entry noting performance improvement by not resetting file_systems when executing Storage.clearDataForOrigin.

Written by Cursor Bugbot for commit 99cb56b. This will update automatically on new commits. Configure here.

…ng file_systems which is not something we need to reset
@ryanthemanuel ryanthemanuel changed the title fix: improve the performance of resetting the browser state by removi… fix: improve the performance of resetting the browser state by removing file_systems which is not something we need to reset Oct 11, 2025
Copy link

cypress bot commented Oct 11, 2025

cypress    Run #66465

Run Properties:  status check passed Passed #66465  •  git commit 99cb56be2e: Merge branch 'develop' into ryanm/fix/reset-state-performance
Project cypress
Branch Review ryanm/fix/reset-state-performance
Run status status check passed Passed #66465
Run duration 19m 30s
Commit git commit 99cb56be2e: Merge branch 'develop' into ryanm/fix/reset-state-performance
Committer Ryan Manuel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 8
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26731
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.4%
  Untested elements 185  
  Tested elements 158  
Accessibility  97.97%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@ryanthemanuel ryanthemanuel changed the title fix: improve the performance of resetting the browser state by removing file_systems which is not something we need to reset fix: improve the performance of resetting the browser state by not resetting file_systems Oct 13, 2025
cursor[bot]

This comment was marked as outdated.

@ryanthemanuel ryanthemanuel merged commit a2adeab into develop Oct 15, 2025
90 of 92 checks passed
@ryanthemanuel ryanthemanuel deleted the ryanm/fix/reset-state-performance branch October 15, 2025 19:10
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 18, 2025

Released in 15.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v15.5.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Oct 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants